1. Field of the Invention
The present invention relates to an electronic control apparatus which comprises a rewritable nonvolatile memory, for writing backup data in the memory during self-shutoff process after a power switch is turned OFF, and a writing method of the backup data.
2. Description of the Related Art
Japanese Laid-open (Kokai) Patent Application Publication No. 2002-082841 discloses that, in an electronic control apparatus comprising a flash memory as an electrically rewritable nonvolatile memory, the writing of control data in the flash memory is executed during self-shutoff process after a key switch is turned OFF.
In the case where a starting process at the next time is demanded during the writing of data into the flash memory, the electronic control apparatus is preliminarily set so as to restart after the writing of data in the flash memory is terminated. However, in such a case, several problems might occur such that, for example, a delay in restarting of the electronic control apparatus brings about an unpleasant situation such that the apparatus cannot be in time for the start of running of a vehicle. On the other hand, if the writing is forcibly terminated in favor of the restart of the electronic control apparatus, in some cases, not only an abnormality might occur in the writing of data but also a memory chip might be adversely affected.